package xjtu.zd.server.staff.comment.dao;

import org.apache.ibatis.annotations.Update;
import xjtu.zd.server.staff.comment.Comment;
import xjtu.zd.server.staff.comment.CommentDto;
import xjtu.zd.server.staff.comment.QueryDto;

import java.util.List;

public interface CommentDao {

    List<Comment> findComment(QueryDto dto);

    @Update("update t_comment set c_status=#{c_status} where c_id=#{c_id} or t_c_c_id=#{c_id}")
    void updComment(CommentDto comment);

    @Update("update t_comment set c_status=0 where c_id=#{c_id} or t_c_c_id=#{c_id}")
    void normalizeComment(Comment comment);

}
